from .question import Question
from .auto_question import AutoQuestion, SingleChoiceQuestion, FillBlankQuestion, MultiChoiceQuestion, SubjectiveQuestion, DissertationQuestion
from .auto_score import AutoScore


# 单个对象方法1
def to_dict(self):
    model_dict = dict(self.__dict__)
    del model_dict['_sa_instance_state']
    return model_dict


# 单个对象方法2
def table_to_dict(self):
    return {c.name: getattr(self, c.name) for c in self.__table__.columns}
